package dper.study.codes.elasticsearch.model;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * Created by leichen on 2017/4/19.
 */
@Data
@Document(indexName = "first_index", type = "second_type")
public class CommitModel {
    @Id
    @Field(type = FieldType.Integer,index = FieldIndex.not_analyzed, store = true)
    private int id ;

    @Field(type = FieldType.String,index = FieldIndex.not_analyzed, store = true)
    private String commitStrId ;

    @Field(type = FieldType.Integer,index = FieldIndex.not_analyzed, store = true)
    private int gitRepoId ;

    @Field(type = FieldType.String, analyzer = "ik", searchAnalyzer="ik", store = true)
    private String changes ;
    private boolean isDelete ;
    private Date createTime ;
    private Date updateTime ;
    private Date deleteTime ;
}
